#ifndef __GAME_H__
#define __GAME_H__

#include "cGraphicsLayer.h"
#include "cInputLayer.h"
#include "cScene.h"
#include "cCityGuardian.h"
#include "cDialogBox.h"
#include "cSound.h"
#include <vector>

#define STATE_MAIN	0
#define STATE_LOAD1 1
#define STATE_GAME	2
#define STATE_EDITOR 3

#define INITIAL_NPCS 10
#define MAX_TILE_INDEX 375

using namespace std;

class cGame
{
	private:
		cGraphicsLayer graphics;
		cInputLayer input;
		cSound sound;
		cScene scene;
		cPC player;
		cDialogBox dialogBox1;
		vector<cNPC*> v_NPCs;

		bool unblock;
	
		int state;

		bool saving, showHeight;
		bool plusTile, lessTile;
		int copiedTile;

		bool LoopInput(void);
		bool LoopProcess(void);
		bool LoopOutput(void);

		void ProcessOrder(void);
		void ProcessEditorOrder(void);

		void BlockCharCells(void);
		void UnBlockCharCells(void);
		void UpdateNPCs(void);

		bool Render(void);

	public:
		cGame(void);
		~cGame(void);

		bool Init(HWND hWnd, HINSTANCE hInst, bool exclusive);
		bool Loop(void); 
		void Finalize(void);
};

#endif
